#coding = utf-8
from python3.modules.sys.entity.sys_menu import SysMenu
class SysMenuService(SysMenu):


    def add_menu(data_json):
        try:
            menu_name = data_json["menu_name"]
            menu_type = data_json["menu_type"]
            menu_url = data_json["menu_url"]
            sort = data_json["sort"]
            del_flag = data_json["del_flag"]
            remarks = data_json["remarks"]

            menu = SysMenu(menu_name=menu_name,menu_type=menu_type,menu_url=menu_url,sort=sort,del_flag=del_flag,remarks=remarks)


            SysMenu.save(menu)
        except:
            return False
        return True

